package com.example.aigc_education.service.converter;

import com.example.aigc_education.domain.Resources;
import com.example.aigc_education.domain.dto.ResourcesDTO;
import com.example.aigc_education.domain.vo.ResourcesVO;
import org.mapstruct.*;

@Mapper(componentModel = "spring")
public interface ResourcesConverter {

    /**
     * ResourcesDTO --> Resources
     */
    @Mappings(
            @Mapping(target = "learningLink", ignore = true)
    )
    Resources resourcesVOToResources(ResourcesVO resourcesVO);


    /**
     * Resources --> ResourcesVO
     */
    @Mappings(
            @Mapping(target = "learningLink", ignore = true)
    )
    ResourcesVO resourcesToResourcesVO(Resources resources);
}
